package cn.stronglink.asset.module.inventory.controller;

import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import com.baomidou.mybatisplus.plugins.Page;
import cn.stronglink.asset.module.inventory.service.InventorySheetService;
import cn.stronglink.asset.module.inventory.vo.InventorySheetVo;
import cn.stronglink.suite.core.base.AbstractController;

@Controller
@RequestMapping(value = "inventorySheet")
public class InventorySheetController extends AbstractController {

	@Autowired
	private InventorySheetService service;

	/**
	 * 查询所有盘点并分页
	 * @param modelMap
	 * @param request
	 * @param response
	 * @param params
	 * @return
	 */
	@RequestMapping(value = "queryList")
	public ResponseEntity<ModelMap> queryList(ModelMap modelMap, HttpServletRequest request,
			HttpServletResponse response, @RequestBody Map<String, Object> params) {	
		@SuppressWarnings("unchecked")
		Page<InventorySheetVo> page = (Page<InventorySheetVo>) super.getPage(params);
		Page<InventorySheetVo> data = service.queryList(page,params);
		return setSuccessModelMap(modelMap, data);
	}
	
	

}
